package Commands;

import domain.Controller;

import java.io.IOException;

import javax.servlet.*;
import javax.servlet.http.*;

public abstract class Command
  extends HttpServlet
{
  /*
   * All new commands must have the nextJspUrl attibute. Should have a default
   * value, which may change as the servlet decides what to send to browser.
   */
  protected String nextJspUrl = 
    "error.jsp"; 

  public void init(CommandFactory comFac, Controller c)
    throws ServletException 
  {
  }

  public void execute(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException 
  {
    //should never run. overridden.
  }
  
  public String getNextJspUrl()
  {
    return nextJspUrl;
  }
}
